﻿using System.Data;

namespace DataAccess.BaseObjects
{
    public interface IEntityModel
    {

        DataTable SelectAll();

        /// <summary>
        /// Utiliza el identificador del BusinessObject para realizar la consulta
        /// </summary>
        /// <param name="businessObject"></param>
        /// <returns></returns>
        DataTable Select(BusinessLogic.BaseObjects.BusinessObject businessObject);

        void Insert(BusinessLogic.BaseObjects.BusinessObject businessObject);

        /// <summary>
        /// Retorna el id recientemente insertado
        /// </summary>
        /// <param name="businessObject"></param>
        /// <returns></returns>
        int InsertIdentity(BusinessLogic.BaseObjects.BusinessObject businessObject);

        /// <summary>
        /// Modifica todos los atributos
        /// </summary>
        /// <param name="businessObject"></param>
        void Update(BusinessLogic.BaseObjects.BusinessObject businessObject);

        /// <summary>
        /// Modifica solo los atributos distintos de null
        /// </summary>
        /// <param name="businessObject"></param>
        void UpdateNoNulls(BusinessLogic.BaseObjects.BusinessObject businessObject);

        /// <summary>
        /// Utiliza el identificador del BusinessObject para realizar la operacion
        /// </summary>
        /// <param name="businessObject"></param>
        void Delete(BusinessLogic.BaseObjects.BusinessObject businessObject);

        void DeleteAllReg();

    }
}
